﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WaterMarkerApp
{
    public partial class BaseSmallForm : BaseForm
    {
        #region private properties

        #endregion

        public BaseSmallForm()
        {
            InitializeComponent();
            this.pnlMainForm.MouseMove += base.pnlMainForm_MouseMove;
            this.pnlMainForm.MouseUp += base.pnlMainForm_MouseUp;
            this.pnlMainForm.MouseDown += base.pnlMainForm_MouseDown;
        }


        #region Events
        private void lblControl_MouseMove(object sender, MouseEventArgs e)
        {
            Label currentLbl = sender as Label;
            if (currentLbl != null)
            {
                switch (currentLbl.Name)
                {
                    case "lblMini":
                        lblMini.Image = global::WaterMarkerApp.Properties.Resources.窗口最小化按钮_1;
                        break;
                    case "lblClose":
                        lblClose.Image = global::WaterMarkerApp.Properties.Resources.窗口关闭按钮_1;
                        break;

                }
            }
        }

        private void lblControl_MouseLeave(object sender, EventArgs e)
        {
            Label currentLbl = sender as Label;
            if (currentLbl != null)
            {
                switch (currentLbl.Name)
                {
                    case "lblMini":
                        lblMini.Image = global::WaterMarkerApp.Properties.Resources.窗口最小化按钮;
                        break;
                    case "lblClose":
                        lblClose.Image = global::WaterMarkerApp.Properties.Resources.窗口关闭按钮;
                        break;

                }
            }
        }

        private void lblControl_Click(object sender, EventArgs e)
        {
            Label currentLbl = sender as Label;
            if (currentLbl != null)
            {
                switch (currentLbl.Name)
                {
                    case "lblMini":
                        this.WindowState = FormWindowState.Minimized;
                        break;
                    case "lblClose":
                        this.Close();
                        break;
                }
            }
        }
        #endregion


        #region private methods

        #endregion

      
    }
}
